<template>
<div> 
    学生姓名:{{stuName}}
        年龄:{{age}}
        <button @click="sendToSchool">将student组件的值传递给school组件</button>
</div>
</template>

<script>


   export default {
        name:'Student',
       
        data(){
       
            return{
          stuName:"李彤康",
          age:18
            }
        },
        components: {},
        methods:{
            sendToSchool(){
           this.$bus.$emit('test','学生组件的值');
           }
   }
}
</script>

<style scoped>

</style>